-- GENERATED SPELL FOR [Shalassi Oracle] --


function spell0_18455(pUnit, Event) --@Arakkoa Blast,n/a--
pUnit:FullCastSpellOnTarget(32907,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_18455', 585, 1)
end

function spell1_18455(pUnit, Event) --@Chain Lightning,n/a--
pUnit:FullCastSpellOnTarget(12058,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_18455', 3000, 1)
end

function spell2_18455(pUnit, Event) --@Lightning Cloud,n/a--
pUnit:FullCastSpellOnTarget(6535,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_18455', 18000, 1)
end

function spell3_18455(pUnit, Event) --@Power of Kran\'aish,n/a--
pUnit:FullCastSpellOnTarget(32924,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_18455', 0, 1)
end

function spell4_18455(pUnit, Event) --@Shock,n/a--
pUnit:FullCastSpellOnTarget(11824,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_18455', 0, 1)
end

function Sorts_18455(pUnit, Event)
local choix_sorts_18455 = math.random(0, 4)
if choix_sorts_18455 == 0 then
pUnit:RegisterEvent('spell0_18455', 1, 1)
end
if choix_sorts_18455 == 1 then
pUnit:RegisterEvent('spell1_18455', 1, 1)
end
if choix_sorts_18455 == 2 then
pUnit:RegisterEvent('spell2_18455', 1, 1)
end
if choix_sorts_18455 == 3 then
pUnit:RegisterEvent('spell3_18455', 1, 1)
end
if choix_sorts_18455 == 4 then
pUnit:RegisterEvent('spell4_18455', 1, 1)
end
end

function mob18455_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_18455', math.random(1500, 3000), 1)
end

function mob18455_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob18455_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob18455_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(18455, 1, 'mob18455_Action')
RegisterUnitEvent(18455, 2, 'mob18455_Leave')
RegisterUnitEvent(18455, 3, 'mob18455_Kill')
RegisterUnitEvent(18455, 4, 'mob18455_Die')
